<template>
    <div class="goods-list">
        <goods-list-item v-for="item in goodsList" :key="item.iid" :goods-list-item="item"></goods-list-item>
    </div>
</template>

<script>
import GoodsListItem from '@/components/content/goods/GoodsListItem'

    export default {
        components: {
            GoodsListItem
        },
        props: {
            goodsList: {
                type: Array,
                default() {
                    return {}
                }
            }
        },
    }
</script>

<style scoped>
.goods-list {
    display: flex;
    /* 一行显示两行，首先到GoodsListItem里给item一个固定到宽度（最好百分比）
    然后定义flex-wrap: wrap */
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 2px;
}
</style>